﻿using Core.Toolkit.Core.Entitys;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Core.SimpleTemp.Entitys
{
    /// <summary>
    /// 用户信息
    /// </summary>
    public class SysUser : Entity
    {
        #region 基础字段
        /// <summary>
        /// 登录名
        /// </summary>
        [StringLength(30)]
        public string LoginName { get; set; }
        /// <summary>
        /// 登录密码
        /// </summary>
        [StringLength(32)]
        public string Password { get; set; }
        /// <summary>
        /// 最后登录时间
        /// </summary>

        [DataType(DataType.DateTime)]
        public DateTime LastUpdate { get; set; }

        /// <summary>
        /// 状态 正常/停用
        /// </summary>
        public byte State { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [StringLength(30)]
        public string Name { get; set; }


        #endregion

        #region 关系表
        public SysUserInfor SysUserInfor { get; set; }
        public ICollection<SysUserDuty> SysUserDuties { get; set; }
        #endregion

    }
}
